home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / MM3Tp.sea Folder / Made by Marksman / Sources / u / menuMM_Demo.p < prev    next >
Text File  |  1994-01-16  |  7KB  |  349 lines

  1. unit UmenuMM_Demo;
  2. {  Copyright © 1994 George R. Cossey }
  3. {  menuMM_Demo                Handle menus
  4.  
  5.     File name:  menuMM_Demo 
  6.     Function:  This contains the routines to handle menus.
  7.     History: 1/16/94 Original by George Cossey
  8.  
  9.    }
  10.  
  11.  
  12. interface
  13.  
  14.     uses
  15.         Printing, Folders, Sound,mmCommonMM_Demo,CommonMM_Demo;
  16.  
  17. { ======================================================= }
  18. { ======================================================= }
  19.  
  20. { Extra to Initialize the menubar }
  21. procedure AddExtraMenus;
  22.  
  23. procedure Do_AppleMenu(Doing_Pre:Boolean;theItem:integer;var SkipProcessing:Boolean);
  24.  
  25. procedure Do_FileMenu(Doing_Pre:Boolean;theItem:integer;var SkipProcessing:Boolean);
  26.  
  27. procedure Do_EditMenu(Doing_Pre:Boolean;theItem:integer;var SkipProcessing:Boolean);
  28.  
  29. procedure Do_WindowsMenu(Doing_Pre:Boolean;theItem:integer;var SkipProcessing:Boolean);
  30.  
  31. { Handle other menu lists }
  32. procedure Handle_Other_Menus(theMenu,theItem:integer);
  33.  
  34. { ======================================================= }
  35. { ======================================================= }
  36.  
  37. implementation
  38.  
  39. { ======================================================= }
  40. { ======================================================= }
  41.  
  42. { Routine: AddExtraMenus }
  43. { Purpose: Add in any extra menus }
  44.  
  45. procedure AddExtraMenus;
  46.  
  47.  
  48. begin
  49. end;
  50.  
  51. { ======================================================= }
  52.  
  53.  
  54. { Routine: Do_AppleMenu }
  55. { Purpose: Handle any menu items for the  menu. }
  56. { Get the main handler to ignore this menu item by changing SkipProcessing   to be TRUE. }
  57.  
  58. procedure Do_AppleMenu(Doing_Pre:Boolean;theItem:integer;var SkipProcessing:Boolean);
  59.  
  60.  
  61. begin
  62. SkipProcessing := FALSE;                            { Set to not skip the processing of this menu item }
  63.  
  64. case (theItem) of                                { Handle all commands in this menu list }
  65.     -1:begin end;
  66.     MItem_About_Demo:                        { For item About Demo… }
  67.         begin
  68.         if (Doing_Pre) then
  69.             begin
  70.             end
  71.         else
  72.             begin
  73.             end;
  74.         end;
  75.     otherwise                                    { allow other buttons, trap for debug }
  76.         begin
  77.         end;                                { end of otherwise }
  78.     end;                                            { end of switch }
  79.  
  80. end;
  81.  
  82. { ======================================================= }
  83.  
  84. { Routine: Do_FileMenu }
  85. { Purpose: Handle any menu items for the File menu. }
  86. { Get the main handler to ignore this menu item by changing SkipProcessing   to be TRUE. }
  87.  
  88. procedure Do_FileMenu(Doing_Pre:Boolean;theItem:integer;var SkipProcessing:Boolean);
  89.  
  90.  
  91. begin
  92. SkipProcessing := FALSE;                            { Set to not skip the processing of this menu item }
  93.  
  94. case (theItem) of                                { Handle all commands in this menu list }
  95.     -1:begin end;
  96.     MItem_New:                        { For item New }
  97.         begin
  98.         if (Doing_Pre) then
  99.             begin
  100.             end
  101.         else
  102.             begin
  103.             end;
  104.         end;
  105.     MItem_Open:                        { For item Open… }
  106.         begin
  107.         if (Doing_Pre) then
  108.             begin
  109.             end
  110.         else
  111.             begin
  112.             end;
  113.         end;
  114.     MItem_Close:                        { For item Close }
  115.         begin
  116.         if (Doing_Pre) then
  117.             begin
  118.             end
  119.         else
  120.             begin
  121.             end;
  122.         end;
  123.     MItem_Save:                        { For item Save }
  124.         begin
  125.         if (Doing_Pre) then
  126.             begin
  127.             end
  128.         else
  129.             begin
  130.             end;
  131.         end;
  132.     MItem_Save_As:                        { For item Save As… }
  133.         begin
  134.         if (Doing_Pre) then
  135.             begin
  136.             end
  137.         else
  138.             begin
  139.             end;
  140.         end;
  141.     MItem_Revert:                        { For item Revert }
  142.         begin
  143.         if (Doing_Pre) then
  144.             begin
  145.             end
  146.         else
  147.             begin
  148.             end;
  149.         end;
  150.     MItem_Page_Setup:                        { For item Page Setup… }
  151.         begin
  152.         if (Doing_Pre) then
  153.             begin
  154.             end
  155.         else
  156.             begin
  157.             end;
  158.         end;
  159.     MItem_Print:                        { For item Print… }
  160.         begin
  161.         if (Doing_Pre) then
  162.             begin
  163.             end
  164.         else
  165.             begin
  166.             end;
  167.         end;
  168.     MItem_Quit:                        { For item Quit }
  169.         begin
  170.         if (Doing_Pre) then
  171.             begin
  172.             end
  173.         else
  174.             begin
  175.             end;
  176.         end;
  177.     otherwise                                    { allow other buttons, trap for debug }
  178.         begin
  179.         end;                                { end of otherwise }
  180.     end;                                            { end of switch }
  181.  
  182. end;
  183.  
  184. { ======================================================= }
  185.  
  186. { Routine: Do_EditMenu }
  187. { Purpose: Handle any menu items for the Edit menu. }
  188. { Get the main handler to ignore this menu item by changing SkipProcessing   to be TRUE. }
  189.  
  190. procedure Do_EditMenu(Doing_Pre:Boolean;theItem:integer;var SkipProcessing:Boolean);
  191.  
  192.  
  193. begin
  194. SkipProcessing := FALSE;                            { Set to not skip the processing of this menu item }
  195.  
  196. case (theItem) of                                { Handle all commands in this menu list }
  197.     -1:begin end;
  198.     MItem_Undo:                        { For item Undo }
  199.         begin
  200.         if (Doing_Pre) then
  201.             begin
  202.             end
  203.         else
  204.             begin
  205.             end;
  206.         end;
  207.     MItem_Cut:                        { For item Cut }
  208.         begin
  209.         if (Doing_Pre) then
  210.             begin
  211.             end
  212.         else
  213.             begin
  214.             end;
  215.         end;
  216.     MItem_Copy:                        { For item Copy }
  217.         begin
  218.         if (Doing_Pre) then
  219.             begin
  220.             end
  221.         else
  222.             begin
  223.             end;
  224.         end;
  225.     MItem_Paste:                        { For item Paste }
  226.         begin
  227.         if (Doing_Pre) then
  228.             begin
  229.             end
  230.         else
  231.             begin
  232.             end;
  233.         end;
  234.     MItem_Clear:                        { For item Clear }
  235.         begin
  236.         if (Doing_Pre) then
  237.             begin
  238.             end
  239.         else
  240.             begin
  241.             end;
  242.         end;
  243.     MItem_Select_All:                        { For item Select All }
  244.         begin
  245.         if (Doing_Pre) then
  246.             begin
  247.             end
  248.         else
  249.             begin
  250.             end;
  251.         end;
  252.     otherwise                                    { allow other buttons, trap for debug }
  253.         begin
  254.         end;                                { end of otherwise }
  255.     end;                                            { end of switch }
  256.  
  257. end;
  258.  
  259. { ======================================================= }
  260.  
  261. { Routine: Do_WindowsMenu }
  262. { Purpose: Handle any menu items for the Windows menu. }
  263. { Get the main handler to ignore this menu item by changing SkipProcessing   to be TRUE. }
  264.  
  265. procedure Do_WindowsMenu(Doing_Pre:Boolean;theItem:integer;var SkipProcessing:Boolean);
  266.  
  267.  
  268. begin
  269. SkipProcessing := FALSE;                            { Set to not skip the processing of this menu item }
  270.  
  271. case (theItem) of                                { Handle all commands in this menu list }
  272.     -1:begin end;
  273.     MItem_Alert:                        { For item Alert… }
  274.         begin
  275.         if (Doing_Pre) then
  276.             begin
  277.             end
  278.         else
  279.             begin
  280.             end;
  281.         end;
  282.     MItem_Modal_Dialog:                        { For item Modal Dialog… }
  283.         begin
  284.         if (Doing_Pre) then
  285.             begin
  286.             end
  287.         else
  288.             begin
  289.             end;
  290.         end;
  291.     MItem_Movable_Modal_D:                        { For item Movable Modal Dialog… }
  292.         begin
  293.         if (Doing_Pre) then
  294.             begin
  295.             end
  296.         else
  297.             begin
  298.             end;
  299.         end;
  300.     MItem_Modeless_Dialog:                        { For item Modeless Dialog… }
  301.         begin
  302.         if (Doing_Pre) then
  303.             begin
  304.             end
  305.         else
  306.             begin
  307.             end;
  308.         end;
  309.     MItem_Window:                        { For item Window… }
  310.         begin
  311.         if (Doing_Pre) then
  312.             begin
  313.             end
  314.         else
  315.             begin
  316.             end;
  317.         end;
  318.     MItem_Floating_window:                        { For item Floating window… }
  319.         begin
  320.         if (Doing_Pre) then
  321.             begin
  322.             end
  323.         else
  324.             begin
  325.             end;
  326.         end;
  327.     otherwise                                    { allow other buttons, trap for debug }
  328.         begin
  329.         end;                                { end of otherwise }
  330.     end;                                            { end of switch }
  331.  
  332. end;
  333.  
  334. { ======================================================= }
  335. { ======================================================= }
  336.  
  337. { Routine: Handle_Other_Menus }
  338. { Purpose: Handle special menus }
  339.  
  340. procedure Handle_Other_Menus(theMenu,theItem:integer);
  341.  
  342.  
  343. begin
  344. end;
  345.  
  346. { ======================================================= }
  347. { ======================================================= }
  348. end.
  349.